1. Field of the Invention
The present invention relates to a moving image encoding apparatus and a moving image encoding method of performing inter-frame encoding of moving images by encoding techniques such as MPEG2.
2. Description of the Related Art
In conventional moving image encoding, MPEG2 etc. are used, and respective pictures are encoded by any of an I-picture for encoding only a frame, a P-picture for encoding the difference between a frame and a reference image using the past frame already encoded on a time basis as the reference image, and a B-picture for encoding the difference between a frame and a reference image using average values of the past frames already encoded on a time basis, the future frames or the past and future frames as the reference image. What these plural pictures are combined is defined as GOP and the number of frames constructing the GOP is indicated by N. Also, a distance between the I-picture and the neighboring P-picture of the GOP is denoted by M, and a configuration of the GOP is represented by the N and M and a distance between the nearest neighboring two P-pictures is also M.
FIG. 8 shows an example of the GOP configuration for N=15 and M=3.
In FIG. 8, images are arranged in the sequence of a frame 201, a frame 202, a frame 203, . . . , a frame 215 in order of time. Encoding first starts with the frame 203 which is the I-picture and next, the B-picture frames of the frame 201 and the frame 202 which are a frame older than the I-picture on a time basis are encoded. Then, the P-picture of the frame 206 after three pictures from the I-picture is encoded, and encoding is performed in the sequence of the frame 204 and the frame 205 which are two B-picture frames present between the I-picture and the P-picture. In like manner below, the P-picture after three pictures is encoded before encoding two B-pictures sandwiched between the I-pictures or the P-pictures, so that encoding is performed in the sequence of the frame 209, the frame 207, the frame 208, the frame 212, the frame 210, the frame 211, the frame 215, the frame 213 and the frame 214.
However, when predictive encoding of moving images is performed, an inter-frame prediction error may increase for some frames and thus, there was a problem that the amount of information occurrence in the case of prediction error encoding becomes large and degradation in image quality is caused.
Particularly, in the case of an image for making a special change in which special video processing is performed as a dissolve image, unlike motion of an object or pan of a camera, motion compensation prediction does not fall and the prediction is difficult, so that a prediction error signal might increase. As a result of that, when predictive encoding of the image for making a special change was performed, the amount of information occurrence became large and degradation in image quality was caused.